
class ListNode:
    def __init__(self, initdata, next=None):
        self.data = initdata
        self.next = next

    def getData(self):
        return self.data

    def getNext(self):
        return self.next

    def setData(self, newdata):
        self.data = newdata

    def setNext(self, newnext):
        self.next = newnext


class Solution:
    def __init__(self):
        self.head = None

    def add(self, item):
        temp = ListNode(item)
        temp.next = self.head
        self.head = temp
    def length(self):
        current=self.head
        count=0
        while current!=None:
            count=count+1
            current=current.getNext()
        return count
    def search(self,k):
        current=self.head
        if k<=self.length():
            for i  in range(k-1):
                current=current.next
            return current.data
        else:
            return "NUll"



lt=list(map(int,input().split()))
k=lt.pop(0)
s=Solution()
for i in lt:
    if i<0:
        break
    s.add(i)

print(s.search(k))